﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace Three_Red_Dragon_Mvc.Controllers
{
    /// <summary>
    /// 物料管理控制器
    /// </summary>
    public class MaterialManagementsController : Controller
    {
        private readonly IpAddressesConfig _ipAddressesConfig;

        public MaterialManagementsController(IOptions<IpAddressesConfig> ipAddressesConfig)
        {
            _ipAddressesConfig = ipAddressesConfig.Value;
        }
        /// <summary>
        /// 物料管理添加视图
        /// </summary>
        /// <returns>返回视图</returns>
        public IActionResult MaterialManagementsCreate()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
        /// <summary>
        /// 物料管理显示视图
        /// </summary>
        /// <returns>返回视图</returns>
        public IActionResult MaterialManagementsSearch()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
        /// <summary>
        /// 物料与服务类型(类别)显示视图
        /// </summary>
        /// <returns>返回视图</returns>
        public IActionResult SearcMaterialCategory()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
        /// <summary>
        /// 物料与服务类型(类别)添加视图
        /// </summary>
        /// <returns>返回视图</returns>
        public IActionResult CreateMaterialCategory()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
    }
}
